# 常用软件 rust cargo

rm -rf $HOME/.cargo
rm -rf $HOME/.rustup

export RUSTUP_DIST_SERVER="https://rsproxy.cn"
export RUSTUP_UPDATE_ROOT="https://rsproxy.cn/rustup"

curl --proto '=https' --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh -s -- -y --default-toolchain nightly

# curl --proto '=https' --tlsv1.2 -sSf https://rsproxy.cn/rustup-init.sh | sh -s -- -y --default-toolchain nightly
source "$HOME/.cargo/env"
ln -sf $HOME/mydotfiles/archlinux/config/langconfig/cargo/config.toml $HOME/.cargo/config.toml
# ln -sf $HOME/mydotfiles/archlinux/config/langconfig/cargo/config $HOME/.cargo/config
# paru -S --needed lld-git --noconfirm -y
# cargo install  wasm-pack cargo-watch fleet-rs sccache

rustup component add rust-analyzer-preview #rust-analyzer
# rustup component add rust-src rustc-dev llvm-tools-preview
#rustup component add rust-src
rustup target add wasm32-unknown-unknown
rustup target add wasm32-wasip2 #wasm32-wasi #wasm32-unknown-unknown

cargo install cargo-edit wasm-tools
# cargo install wasm-pack cargo-watch rustowl

# cargo install wasm-pack # --features curl/static-curl
# curl -fsSLk https://gitee.com/wtklbm/rust-library-chinese/raw/main/bin/install.sh | sh -s -- -y  # 中文库 1.6.1

# cargo install  wasm-pack cargo-watch fleet-rs sccache
# cargo install --git https://github.com/dimensionhq/fleet fleet-rs
# cargo install --git https://github.com/solidiquis/erdtree
